package com.ls.pattern.structure.decorator;

import com.ls.pattern.structure.decorator.model.Drink;
import com.ls.pattern.structure.decorator.model.LongBlack;

public class Main {
    public static void main(String[] args) {
        Drink drink = new LongBlack();
        System.out.println("费用1: " + drink.cost());
        System.out.println("描述: "+drink.getDes());
        drink = new Milk(drink);
        System.out.println("费用2: " + drink.cost());
        System.out.println("描述: "+drink.getDes());
        drink = new Chocolate(drink);
        System.out.println("费用3: " + drink.cost());
        System.out.println("描述: "+drink.getDes());

    }
}
